package com.abc.scholarship.mapper;


import com.abc.scholarship.domain.entity.Menu;
import com.abc.scholarship.domain.entity.Role;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * <p>
 * 用户表 Mapper 接口
 * </p>
 *
 * @author jzw
 * @since 2024-07-02
 */
@Mapper
public interface MenuMapper extends BaseMapper<Menu> {

    /**通过id查权限
     *
     * @param userId
     * @return
     */
    List<Menu> findMenuListByUserId(Long userId);

    /**根据角色Id查询权限列表
     *
     * @param roleId
     * @return
     */
    List<Menu> findMenuListByRoleId(Long roleId);
}
